package md.lanjing.com.module_home.ui.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lxh.baselibray.util.TimeUtils;

import java.text.SimpleDateFormat;
import java.util.List;

import md.lanjing.com.module_home.R;
import md.lanjing.com.module_home.bean.NearDayProfitResponce;


public class TodayProfitAdapter extends BaseQuickAdapter<NearDayProfitResponce.DataBean,BaseViewHolder> {
    public TodayProfitAdapter(int layoutResId, @Nullable List<NearDayProfitResponce.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, NearDayProfitResponce.DataBean item) {
        helper.setText(R.id.tv_date, TimeUtils.millis2String(item.getDate(),new SimpleDateFormat("yyyy-MM-dd")))
                .setText(R.id.tv_profit,item.getSameDayIncome()+"")
                .setText(R.id.tv_green_profit,item.getGreenCawd()+"")
                .setText(R.id.tv_carton_take,item.getAbsorbCawd()+"");
    }
}
